<h1>Add a Appointment</h1>

<p><?php echo validation_errors(); ?></p>
<form action="<?php echo site_url('visits'); ?>/add/<?php echo $id; ?>" method="post">
<fieldset>
        <legend>Visit Information</legend>

        <?php if(isset($id)):?>
         <input type='hidden' name='id' value='<?php echo $id; ?>' />
        <?php endif;?>
				<label for="vdate">Visit Date:</label><input type="text" name="vdate" id="vdate" tabindex="1" value="<?php echo set_value('visit_date'); ?>" /><label>YYYY-MM-DD</label>
				 <label for="vtime">Visit Time:</label><input type="text" name="vtime" id="vtime" tabindex="2" value="<?php echo set_value('visit_time'); ?>" /><label>HH:MM </label><p/>

        <label for="purpose">Purpose:</label><textarea id="purpose" name="purpose" tabindex="3" cols="61" rows="3" ><?php echo set_value('purpose'); ?></textarea><p/>
				<label for="action">Action:</label><textarea id="action" name="action" tabindex="4" cols="61" rows="3"  <?php if($permission ==0) echo "disabled";?> ><?php echo set_value('action'); ?></textarea><p/>
				<label for="docnotes">Doctor Notes:</label><textarea id="docnotes" name="docnotes" tabindex="5" cols="61" rows="3"  <?php if($permission ==0) echo "disabled";?> ><?php echo set_value('docnotes'); ?></textarea><p/>
				<label for="other">Other Notes:</label><textarea id="other" name="other" tabindex="6" cols="61" rows="3" ><?php echo set_value('other_notes'); ?></textarea><p/>

        <button type="submit" tabindex="7">Submit &raquo;</button>
    </fieldset>
</form>